| Fully Qualified Name: | CodeIgniter\View\Parser |
| Extends: | View |
Class Parser
ClassFormerlyKnownAsTemplateParser
| Name | Description | Defined By |
|---|---|---|
| __construct() | Constructor | Parser |
| addPlugin() | Makes a new plugin available during the parsing of the template. | Parser |
| endSection() | View | |
| excerpt() | Extract first bit of a long string and add ellipsis | View |
| extend() | Specifies that the current view should extend an existing layout. | View |
| getData() | Returns the current data that will be displayed in the view. | View |
| getPerformanceData() | Returns the performance data that might have been collected during the execution. Used primarily in the Debug Toolbar. | View |
| include() | Used within layout views to include additional views. | View |
| insertNoparse() | Re-inserts the noparsed contents back into the template. | Parser |
| removePlugin() | Removes a plugin from the available plugins. | Parser |
| render() | Parse a template | Parser |
| renderSection() | Renders a section's contents. | View |
| renderString() | Parse a String | Parser |
| resetData() | Removes all of the view data from the system. | View |
| section() | Starts holds content for a section within the layout. | View |
| setData() | Sets several pieces of view data at once. | Parser |
| setDelimiters() | Over-ride the substitution field delimiters. | Parser |
| setVar() | Sets a single piece of view data. | View |
| shouldAddEscaping() | Checks the placeholder the view provided to see if we need to provide any autoescaping. | Parser |
Constructor
| Parameter Name | Type | Description |
|---|---|---|
| $config | \Config\View | |
| $viewPath | string | |
| $loader | mixed | |
| $debug | bool | |
| $logger | \LoggerInterface |
Returns:
Makes a new plugin available during the parsing of the template.
| Parameter Name | Type | Description |
|---|---|---|
| $alias | string | |
| $callback | callable | |
| $isPair | bool |
Returns: $this
Returns:
Extract first bit of a long string and add ellipsis
| Parameter Name | Type | Description |
|---|---|---|
| $string | string | |
| $length | int |
Returns: string
Specifies that the current view should extend an existing layout.
| Parameter Name | Type | Description |
|---|---|---|
| $layout | string |
Returns: void
Returns the current data that will be displayed in the view.
Returns: array
Returns the performance data that might have been collected during the execution. Used primarily in the Debug Toolbar.
Returns: array
Used within layout views to include additional views.
| Parameter Name | Type | Description |
|---|---|---|
| $view | string | |
| $options | array|null | |
| $saveData | null |
Returns: string
Re-inserts the noparsed contents back into the template.
| Parameter Name | Type | Description |
|---|---|---|
| $template | string |
Returns: string
Removes a plugin from the available plugins.
| Parameter Name | Type | Description |
|---|---|---|
| $alias | string |
Returns: $this
Parse a template
Parses pseudo-variables contained in the specified template view, replacing them with any data that has already been set.
| Parameter Name | Type | Description |
|---|---|---|
| $view | string | |
| $options | array | |
| $saveData | bool |
Returns: string
Renders a section's contents.
| Parameter Name | Type | Description |
|---|---|---|
| $sectionName | string |
Returns:
Parse a String
Parses pseudo-variables contained in the specified string, replacing them with any data that has already been set.
| Parameter Name | Type | Description |
|---|---|---|
| $template | string | |
| $options | array | |
| $saveData | bool |
Returns: string
Removes all of the view data from the system.
Returns: \RendererInterface
Starts holds content for a section within the layout.
| Parameter Name | Type | Description |
|---|---|---|
| $name | string |
Returns:
Sets several pieces of view data at once.
In the Parser, we need to store the context here so that the variable is correctly handled within the parsing itself, and contexts (including raw) are respected.
| Parameter Name | Type | Description |
|---|---|---|
| $data | array | |
| $context | string | The |
Returns: \RendererInterface
Over-ride the substitution field delimiters.
| Parameter Name | Type | Description |
|---|---|---|
| $leftDelimiter | string | |
| $rightDelimiter | string |
Returns: \RendererInterface
Sets a single piece of view data.
| Parameter Name | Type | Description |
|---|---|---|
| $name | string | |
| $value | mixed | |
| $context | string | The |
Returns: \RendererInterface
Checks the placeholder the view provided to see if we need to provide any autoescaping.
| Parameter Name | Type | Description |
|---|---|---|
| $key | string |
Returns: bool|string